#include "App_ETH.h"
extern void user_register_function(void);
uint8_t mac[6] = {153, 159, 189, 177, 133, 151};
uint8_t ip[4] = {192, 168, 59, 137};
uint8_t sub[4] = {255, 255, 255, 0};
uint8_t gar[4] = {192, 168, 59, 1};
void App_ETH_Init(void)
{
    HAL_GPIO_WritePin(W5500_RST_GPIO_Port, W5500_RST_Pin, GPIO_PIN_RESET);
    HAL_Delay(100);
    HAL_GPIO_WritePin(W5500_RST_GPIO_Port, W5500_RST_Pin, GPIO_PIN_SET);
    debug_printf("开始网络配置!\n");
    HAL_Delay(1000);
    user_register_function();

    // 配置mac地址
    setSHAR(mac);

    // 配置ip地址
    setSIPR(ip);

    // 配置子网掩码
    setSUBR(sub);
    // 配置默认网关
    setGAR(gar);
    debug_printf("网络配置完成!\r\n");
}
